<template>
  <div>
    <qr-canvas :options="options" @updated="onUpdated"></qr-canvas>
  </div>
</template>

<script>
import { QRCanvas } from 'qrcanvas-vue'
export default {
  components: {
    'qr-canvas': QRCanvas
  },
  data () {
    return {
      options: {}
    }
  },
  created () {
    this.options = Object.assign({}, this.options, {
      cellSize: 8,
      // data: 'new data'
      data: 'https://www.baidu.com'
    })
  },
  methods: {
    onUpdated (e) {
      console.log(e)
    }
  }
}
</script>

<style lang="scss" scoped></style>
